Skip to content

[CEL-1522] Allow version-pinned npm: aliases of allowed private packages - #24

Merged
mong-x merged 1 commit into
mainfrom
marcus/cel-1522-allow-frozen-renderer-alias
Aug 28, 2026
Merged

[CEL-1522] Allow version-pinned npm: aliases of allowed private packages#24
mong-x merged 1 commit into
mainfrom
marcus/cel-1522-allow-frozen-renderer-alias

Conversation

@mong-x

@mong-x mong-x commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Why

elabel-frontend#196 (CEL-1522 scan publication boundary) pins the public scan renderer to a frozen release via a registry alias: "@cellarnode/ui-renderer-0-154": "npm:@cellarnode/ui@0.154.0". The deploy-static-website manifest guard rejects it three ways: unknown alias NAME, npm: protocol value (the manifest guard lacked the npm: exemption the lock validator's non_registry_protocol deliberately has), and the scope slash tripping the path-or-archive heuristic.

What

Allow exactly this shape, nothing wider:

  • alias name ui-renderer-0-154 joins both allow-lists;
  • a dependency value is exempt from the source checks only when anchored npm:@cellarnode/<allowed>@<version> with no whitespace/slashes/backslashes in the version.

Still rejected (fixtures added): alias to a public/unknown target (npm:leftpad@1), path traversal in the version spec (@0.154.0/../../evil), and every previously rejected source shape (file:/git:/workspace:/shorthand/tgz).

Verification

  • ruby .github/tests/deploy-static-lock-validator.test.rb → 28 lock + 46 manifest fixtures pass (was 40; +3 cases × 2 script variants).
  • Both extracted validators run against the real elabel-frontend#196 worktree: manifest + lockfile PASS.
  • 8-case negative matrix exercised manually; only the exact frozen-alias shape is admitted.

Unblocks elabel-frontend#196 → CEL-1522/1523/1524 closure. Flagged in the goal report for Marcus's veto — this is shared deploy-guard infra.

🤖 Generated with Claude Code


Summary by cubic

Allows version-pinned npm: aliases that target allowed private packages in the deploy manifest guard, unblocking the frozen renderer alias @cellarnode/ui-renderer-0-154 -> npm:@cellarnode/ui@0.154.0 for CEL-1522.

  • The alias name ui-renderer-0-154 is added to both allow-lists.
  • Only aliases anchored as npm:@cellarnode/<allowed>@<version> with no whitespace, slashes, or backslashes in the version are exempt from source checks.
  • Aliases to public or unknown targets, path traversal in the version spec, and all previously rejected source shapes still fail; fixtures cover these cases.

Written for commit a84efe2. Summary will update on new commits.

Review in cubic

The e-label frontend pins its public scan renderer to a frozen release
via a registry alias: @cellarnode/ui-renderer-0-154 -> npm:@cellarnode/ui@0.154.0.
The manifest guard rejected it three ways: the alias NAME is not in
allowed_private_packages, the npm: value tripped the protocol check
(which, unlike the lock validator's non_registry_protocol, had no npm:
exemption), and the scope slash in the alias value tripped the
path-or-archive heuristic.

Allow exactly this shape and nothing wider: the alias name joins the
allow-lists, and a value is exempt from the source checks only when it
is anchored npm:@cellarnode/<allowed>@<version> with no whitespace,
slashes, or backslashes in the version. Aliases pointing at public or
unknown packages, path traversal in the version spec, and every
previously rejected source shape still fail — fixtures added for all
three.
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de9e7230-b472-4b29-ac0d-75c8247388f8

📥 Commits

Reviewing files that changed from the base of the PR and between 1d0f696 and a84efe2.

📒 Files selected for processing (2)
  • .github/tests/deploy-static-lock-validator.test.rb
  • .github/workflows/deploy-static-website.yaml

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Deployment validation now correctly accepts approved private renderer package aliases.
    • Added safeguards to reject unapproved public package targets and version references containing unsafe path-traversal segments.
    • Improved validation coverage with additional deployment manifest scenarios.

Walkthrough

The deployment validators now allow @cellarnode/ui-renderer-0-154 and its approved npm: alias. Tests reject aliases targeting public packages or containing path traversal.

Changes

Renderer alias validation

Layer / File(s) Summary
Package allowlist updates
.github/workflows/deploy-static-website.yaml
The manifest and lock validators allow ui-renderer-0-154.
Alias source validation
.github/workflows/deploy-static-website.yaml, .github/tests/deploy-static-lock-validator.test.rb
The manifest validator recognizes approved npm:@cellarnode/... aliases. Fixtures cover valid aliases, public targets, and path traversal.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: feature

Suggested reviewers: lebedevdsl

Poem

A rabbit checks the renderer trail,
An approved alias hops the rail.
Public names are turned away,
Traversal paths cannot stay.
The validator guards the hay.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch marcus/cel-1522-allow-frozen-renderer-alias

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mong-x
mong-x merged commit 341fdbc into main Aug 28, 2026
2 of 3 checks passed
@mong-x
mong-x deleted the marcus/cel-1522-allow-frozen-renderer-alias branch August 28, 2026 21:57
@coderabbitai coderabbitai Bot added the feature label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant